import  React,{Component} from "react"
import   "../../css/index/index_toplist.css"
import {Link} from 'react-router'
export  default  class  TopList extends Component{
    constructor(props) {
        super(props)
        this.state = {
            list: [{id:0,name: "新闻", url: "/news"},
                {id:1,name: "财经", url: "/money"},
                {id:2,name: "娱乐", url: "/happy"},
                {id:3,name: "体育", url: "/sport"},
                {id:4,name: "更多", url: "/more"},
                {id:5,name: "军事", url: "/soldier"},
                {id:6,name: "NBA", url: "/nba"},
                {id:7,name: "应用", url: "/app"},
                {id:8,name: "科技", url: "/sci"},
                {id:9,name: "星座", url: "/xz"}]
        }
    }
        render(){

           return (
               <ul className="toplist_ul">
                   {
                      this.state.list.map(function (v) {
                       return    <li key={v.id}>
                                <Link to={v.url}>
                                    {v.name}
                                </Link>
                                </li>
                       })
                   }
               </ul>
           )
        }

}